Most places accept Visa and Mastercard.
You can carry cash, but its best not to carry too much with you. London is pretty safe, but like all capital cities, it does have its pickpockets.
Bear in mind that if you're not spending a significant amount in a transaction (say less than £5-10) then some smaller shops may charge you to use your card.