<?xml version="1.0" encoding="us-ascii"?><InstanceReport xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Version>2.4.0.8</Version><ReportLongName>4260 - Disclosure - Legal Matters (Details)</ReportLongName><DisplayLabelColumn>true</DisplayLabelColumn><ShowElementNames>false</ShowElementNames><RoundingOption /><HasEmbeddedReports>false</HasEmbeddedReports><Columns><Column FlagID="0"><Id>1</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><CurrencyCode /><FootnoteIndexer /><hasSegments>false</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName /><CurrencySymbol /><contextRef><ContextID>D2012</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001065860</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2012-01-01T00:00:00</PeriodStartDate><PeriodEndDate>2012-12-31T00:00:00</PeriodEndDate><Segments /><Scenarios /></contextRef><UPS><UnitProperty><UnitID>Item</UnitID><UnitType>Standard</UnitType><StandardMeasure><MeasureSchema>http://www.lime-energy.com/20121231</MeasureSchema><MeasureValue>item</MeasureValue><MeasureNamespace>lime</MeasureNamespace><MeasureDescription /><MeasureType /></StandardMeasure><Scale>0</Scale></UnitProperty></UPS><CurrencyCode /><OriginalCurrencyCode /></MCU><CurrencySymbol /><Labels><Label Key="CalendarSupplement" Id="0" Label="12 Months Ended" /><Label Key="Calendar" Id="1" Label="Dec. 31, 2012" /><Label Key="" Id="2" Label="item" /></Labels></Column><Column FlagID="0"><Id>2</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><CurrencyCode /><FootnoteIndexer /><hasSegments>true</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName /><CurrencySymbol /><contextRef><ContextID>D2012Q3_M0717_SatterfieldVsLimeEnergyCoMember</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001065860</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2012-07-16T00:00:00</PeriodStartDate><PeriodEndDate>2012-07-17T00:00:00</PeriodEndDate><Segments><anyType xsi:type="Segment"><IsDefaultForEntity>false</IsDefaultForEntity><Name /><IsFromEntityGroup>false</IsFromEntityGroup><ValueName>Satterfield v. Lime Energy Co.</ValueName><ValueType>us-gaap_LitigationCaseAxis</ValueType><Namespace>xbrldi</Namespace><Schema>http://xbrl.org/2006/xbrldi</Schema><DimensionInfo><Id>lime_SatterfieldVsLimeEnergyCoMember</Id><dimensionId>us-gaap_LitigationCaseAxis</dimensionId><type>explicitMember</type></DimensionInfo></anyType></Segments><Scenarios /></contextRef><UPS><UnitProperty><UnitID>Item</UnitID><UnitType>Standard</UnitType><StandardMeasure><MeasureSchema>http://www.lime-energy.com/20121231</MeasureSchema><MeasureValue>item</MeasureValue><MeasureNamespace>lime</MeasureNamespace><MeasureDescription /><MeasureType /></StandardMeasure><Scale>0</Scale></UnitProperty></UPS><CurrencyCode /><OriginalCurrencyCode /></MCU><CurrencySymbol /><Labels><Label Key="CalendarSupplement" Id="0" Label="0 Months Ended" /><Label Key="Calendar" Id="1" Label="Jul. 17, 2012" /><Label Key="us-gaap_LitigationCaseAxis:lime_SatterfieldVsLimeEnergyCoMember" Id="2" Label="Satterfield v. Lime Energy Co." /><Label Key="" Id="3" Label="item" /></Labels></Column><Column FlagID="0"><Id>3</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><CurrencyCode /><FootnoteIndexer /><hasSegments>true</hasSegments><hasScenarios>false</hasScenarios><MCU><KeyName /><CurrencySymbol /><contextRef><ContextID>D2013Q2_M0409_KuberskiVsLimeEnergyCoMember</ContextID><EntitySchema>http://www.sec.gov/CIK</EntitySchema><EntityValue>0001065860</EntityValue><PeriodDisplayName /><PeriodType>duration</PeriodType><PeriodStartDate>2013-04-08T00:00:00</PeriodStartDate><PeriodEndDate>2013-04-09T00:00:00</PeriodEndDate><Segments><anyType xsi:type="Segment"><IsDefaultForEntity>false</IsDefaultForEntity><Name /><IsFromEntityGroup>false</IsFromEntityGroup><ValueName>Kuberski v. Lime Energy Co.</ValueName><ValueType>us-gaap_LitigationCaseAxis</ValueType><Namespace>xbrldi</Namespace><Schema>http://xbrl.org/2006/xbrldi</Schema><DimensionInfo><Id>lime_KuberskiVsLimeEnergyCoMember</Id><dimensionId>us-gaap_LitigationCaseAxis</dimensionId><type>explicitMember</type></DimensionInfo></anyType></Segments><Scenarios /></contextRef><UPS><UnitProperty><UnitID>Item</UnitID><UnitType>Standard</UnitType><StandardMeasure><MeasureSchema>http://www.lime-energy.com/20121231</MeasureSchema><MeasureValue>item</MeasureValue><MeasureNamespace>lime</MeasureNamespace><MeasureDescription /><MeasureType /></StandardMeasure><Scale>0</Scale></UnitProperty></UPS><CurrencyCode /><OriginalCurrencyCode /></MCU><CurrencySymbol /><Labels><Label Key="CalendarSupplement" Id="0" Label="0 Months Ended" /><Label Key="Calendar" Id="1" Label="Apr. 09, 2013" /><Label Key="us-gaap_LitigationCaseAxis:lime_KuberskiVsLimeEnergyCoMember" Id="2" Label="Kuberski v. Lime Energy Co." /><Label Key="" Id="3" Label="item" /></Labels></Column></Columns><Rows><Row FlagID="0"><Id>1</Id><IsAbstractGroupTitle>true</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>3</Level><ElementName>us-gaap_LossContingenciesLineItems</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole>terseLabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell><Cell FlagID="0" ContextID="" UnitID=""><Id>2</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell><Cell FlagID="0" ContextID="" UnitID=""><Id>3</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>xbrli:stringItemType</ElementDataType><SimpleDataType>string</SimpleDataType><IsTotalLabel>false</IsTotalLabel><UnitID>0</UnitID><Label>Legal Matters</Label></Row><Row FlagID="0"><Id>2</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>4</Level><ElementName>us-gaap_LossContingencyNewClaimsFiledNumber</ElementName><ElementPrefix>us-gaap_</ElementPrefix><IsBaseElement>true</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole>terseLabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="D2012" UnitID="Item"><Id>1</Id><IsNumeric>true</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>2</NumericAmount><RoundedNumericAmount>2</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell><Cell FlagID="0" ContextID="D2012Q3_M0717_SatterfieldVsLimeEnergyCoMember" UnitID="Item"><Id>2</Id><IsNumeric>true</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>4</NumericAmount><RoundedNumericAmount>4</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell><Cell FlagID="0" ContextID="" UnitID=""><Id>3</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>xbrli:integerItemType</ElementDataType><SimpleDataType>integer</SimpleDataType><ElementDefenition>The total number of new claims filed pertaining to a loss contingency during the period.</ElementDefenition><ElementReferences>Reference 1: http://www.xbrl.org/2003/role/presentationRef

 -Publisher FASB

 -Name Statement of Financial Accounting Standard (FAS)

 -Number 5

 -Paragraph 9, 10, 11, 12

 -LegacyDoc This reference is SUPERSEDED by the Accounting Standards Codification effective for interim and annual periods ending after September 15, 2009.  This reference is included to help users transition from the previous accounting hierarchy and will be removed from future versions of this taxonomy.



</ElementReferences><IsTotalLabel>false</IsTotalLabel><UnitID>256</UnitID><Label>Number of class actions filed</Label></Row><Row FlagID="0"><Id>3</Id><IsAbstractGroupTitle>false</IsAbstractGroupTitle><LabelSeparator>

</LabelSeparator><Level>4</Level><ElementName>lime_LossContingencyNumberOfCasesConsolidated</ElementName><ElementPrefix>lime_</ElementPrefix><IsBaseElement>false</IsBaseElement><BalanceType>na</BalanceType><PeriodType>duration</PeriodType><IsReportTitle>false</IsReportTitle><IsSegmentTitle>false</IsSegmentTitle><IsCalendarTitle>false</IsCalendarTitle><IsEquityPrevioslyReportedAsRow>false</IsEquityPrevioslyReportedAsRow><IsEquityAdjustmentRow>false</IsEquityAdjustmentRow><IsBeginningBalance>false</IsBeginningBalance><IsEndingBalance>false</IsEndingBalance><IsReverseSign>false</IsReverseSign><PreferredLabelRole>terseLabel</PreferredLabelRole><FootnoteIndexer /><Cells><Cell FlagID="0" ContextID="" UnitID=""><Id>1</Id><IsNumeric>false</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>0</NumericAmount><RoundedNumericAmount>0</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell><Cell FlagID="0" ContextID="D2012Q3_M0717_SatterfieldVsLimeEnergyCoMember" UnitID="Item"><Id>2</Id><IsNumeric>true</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>4</NumericAmount><RoundedNumericAmount>4</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell><Cell FlagID="0" ContextID="D2013Q2_M0409_KuberskiVsLimeEnergyCoMember" UnitID="Item"><Id>3</Id><IsNumeric>true</IsNumeric><IsRatio>false</IsRatio><DisplayZeroAsNone>false</DisplayZeroAsNone><NumericAmount>2</NumericAmount><RoundedNumericAmount>2</RoundedNumericAmount><NonNumbericText /><FootnoteIndexer /><CurrencyCode /><CurrencySymbol /><IsIndependantCurrency>false</IsIndependantCurrency><ShowCurrencySymbol>false</ShowCurrencySymbol><DisplayDateInUSFormat>false</DisplayDateInUSFormat></Cell></Cells><ElementDataType>xbrli:integerItemType</ElementDataType><SimpleDataType>integer</SimpleDataType><ElementDefenition>Represents the number of cases consolidated.</ElementDefenition><ElementReferences>No definition available.</ElementReferences><IsTotalLabel>false</IsTotalLabel><UnitID>256</UnitID><Label>Number of cases consolidated</Label></Row></Rows><Footnotes /><IsEquityReport>false</IsEquityReport><ReportName>Legal Matters (Details)</ReportName><MonetaryRoundingLevel>UnKnown</MonetaryRoundingLevel><SharesRoundingLevel>UnKnown</SharesRoundingLevel><PerShareRoundingLevel>UnKnown</PerShareRoundingLevel><ExchangeRateRoundingLevel>UnKnown</ExchangeRateRoundingLevel><HasCustomUnits>true</HasCustomUnits><IsEmbedReport>false</IsEmbedReport><IsMultiCurrency>false</IsMultiCurrency><ReportType>Sheet</ReportType><RoleURI>http://www.lime-energy.com/role/DisclosureLegalMattersDetails</RoleURI><NumberOfCols>3</NumberOfCols><NumberOfRows>3</NumberOfRows></InstanceReport>
