It depends on how you usually travel to and from the supermarket, and how your food is delivered. If you usually walk, cycle or use public transport, then having food delivered in a van is less environmentally friendly. According to the Office for National Statistics, roughly one-fifth of UK greenhouse gas emissions come from road transport. Walking, cycling or using public transport as opposed to relying on smaller road vehicles for food delivery helps to reduce greenhouse gas emissions and energy/fuel consumption. However, if you usually drive a car to and from the shops, then home delivery is likely to be more energy and fuel efficient. Multiple deliveries can be made to homes in the same area, minimising road miles, emissions and fuel usage. There is not necessarily a clear-cut answer to this question, as multiple factors such as where you live, and how frequently you shop, should also be taken into consideration.
Even if food is delivered on bikes or on foot, there are other environmental factors to consider that might mean that going to the shops is more environmentally friendly than delivery. For reasons of hygiene or practicality in transportation, delivered foods may arrive with excess packaging, for instance. Emine Saner notes that ‘nearly a third of solid waste in the US comes from e-commerce packaging’. In order to ensure minimal packaging waste is generated, it might be more environmentally friendly to physically go to the shops (by walking, cycling or using public transport) to buy package-free products (wherever possible), which can be carried home in a reusable shopping bag. For more information on different types of reusable shopping bags, see OneSharedEarth question, 'Which type of reusable shopping bag is the most environmentally friendly?'.
Office for National Statistics, ‘Road Transport and Air Emissions’ (2019), accessed at: https://www.ons.gov.uk/economy/environmentalaccounts/articles/roadtransportandairemissions/2019-09-16#greenhouse-gas-emissions-from-road-transport-make-up-around-a-fifth-of-uk-greenhouse-gas-emissions
Saner, E., ‘Delivery Disaster: the hidden environmental cost of your online shopping’, The Guardian (17 February 2020), accessed at: https://www.theguardian.com/news/shortcuts/2020/feb/17/hidden-costs-of-online-delivery-environment