Can I get a driver's license with a pending I-485?
Usually yes. Federal REAL ID rules count a pending adjustment as lawful status, so most states issue a temporary license tied to your EAD or I-94 dates.
In most states, yes, with conditions. Federal REAL ID rules list a pending application for adjustment of status among the forms of lawful status that qualify a person for a driver's licence or ID card, and the card issued on that basis is a temporary one that expires with the immigration document you showed (6 CFR 37.3). States run their own licensing, so the documents, the fee and the validity period differ.
What the federal rule says
The REAL ID regulations set the minimum a state must check before it issues a compliant licence. A person with a pending I-485 can show the documents that prove it, and the state issues a temporary licence whose expiry date follows the end of the authorised stay, or one year when no date applies (6 CFR 37.21). That is why the licence in this situation is usually valid for a short period and says "temporary" or "limited term".
What states usually ask for
The motor vehicle office decides what to accept. Applicants commonly bring:
the I-485 receipt notice (Form I-797C) or the EAD;
a passport and I-94 record;
proof of a Social Security number, or a letter that the person is not eligible for one;
two proofs of state residence, such as a lease or a utility bill;
the fee.
Some states ask for the EAD and not the receipt; some accept either. An office that is not sure may ask for the I-797C and a second document. Reading the state's own page before going saves a trip.
The expiry and the renewal
A limited-term licence ends on the date of the document used to get it, which is often the EAD's end date. If the EAD is renewed, the licence is renewed with it, by showing the new card. If the licence expires before a new card arrives, driving on it is not lawful in most states, so the renewal timeline of the EAD and of the licence move together.
What goes wrong
An H-4 or F-1 licence that outlives the status. After approval of the green card, the licence should be updated to the permanent-resident version.
Wrong document. A receipt for the I-485 alone is not accepted everywhere.
Assuming one state's answer applies to another. A move needs a fresh application.
No SSN. A few states waive the SSN requirement, but most want the number or proof of ineligibility, and the EAD is the document that allows the number to be issued.
What to do
Check the state agency's page for "lawful presence", bring both the receipt notice and the EAD, and keep the licence expiry date in step with the card. When the green card arrives, return to the agency and ask for the standard licence.