No, you cannot use a UK driving licence as a form of identification for flying within the UK.
For domestic flights (e.g., London to Edinburgh), UK airlines are not legally required to ask for photo ID. However, in practice, all major airlines require valid photo identification at check-in and the boarding gate.
A UK driving licence is one of the most commonly accepted and recommended forms of ID for this purpose, but it must be the photocard licence. The old paper-only licence is not acceptable.
Requirements can vary slightly between airlines (e.g., Ryanair, easyJet, British Airways). It is essential to check your airline’s specific “travel documents” policy on their website before you travel.
In short: For flying within the UK, your photocard driving licence is ideal. For any flight leaving the UK, you need your passport.