I tend to keep a couple of chocolate bars (current choice is "Double Decker") and some biscuits in the saddlebag, which are there for when I feel the bonk approaching (usually after about 2 hours or, when camping, 5-10 miles before the campsite). If I'm planning on being out for three hours or more, I tend to take food or buy food - pretty much my normal food/snacking stuff - savoury and sweet - often a "packed lunch".
I used to make flapjack for biking and home consumption but found it too addictive so I had to stop.
All rides except utility rides, I have a bottle on the bike with fruit squash - it contains some sugar. Unless the ride is more than two hours (or it's really hot weather), I often bring the full bottle back and drink it at home.