In the US, there are no federal laws against living in your vehicle (meaning vanlife is perfectly legal across the country). However, there are laws that restrict where you can park.
Generally, it’s illegal to park on anyone’s private property (such as a personal driveway) or remain overnight on property that’s owned by a city (unless that city makes exceptions).
There are also parking restrictions that vary by state. For example, New York doesn’t prohibit anyone from sleeping in their vans at rest stops, but California has laws against remaining at rest stops during the night. Other states (like New Jersey and Delaware) permit overnight stays at some rest stops, but not at others.
Overall, there are twenty states (including Colorado, Florida, Maryland, Pennsylvania and Wisconsin) that have laws regarding where you may park. Before driving to a new state, be sure to familiarize yourself with the local regulations and check where you can (and cannot) park or stay overnight. You can find a list of state laws here.
Similar to the US, the UK does not have any laws against vanlife, but does impose restrictions on parking. There are also laws against being in a van while inebriated (even if you’re not operating the vehicle). If you plan to drink, you should have at least one other passenger who is sober and can drive if necessary.