It is generally illegal in Northern VA (including Loudoun) to convert a single family dwelling into multiple housing units. Exceptions can be applied for with your county government but those exceptions are few and limited to a specific time period. I think Loudoun has something like 7 current permits for this type of set up. Most HOA's also have rules against this type of modification. Most HOA's do, however, allow a reasonable number of roommates to share a single family dwelling. Basically this all means it's ok to rent your basement as long as the occupant is sharing the use of the entire home, the basement isn't being marketed and used as a separate entity, and the basement doesn't have a second kitchen (which is against zoning laws) It is ok to have a wet bar, microwave, fridge, and even a dishwasher in your finished basement (absolutely no stoves.) Insurance companies (as I understand) do not insure properties with basement kitchens and you cannot obtain permits for their construction (making them against code) so any time you see this it's likely an illegal set up and one that has not been properly installed with required permits.
The reasons for these rules is to avoid over crowding of single family homes, decrease excessive wear and tear, decrease over crowding of public parking areas, avoid overcrowding in schools and roads, and to reduce fire hazards. This is ultimately in the best interest of the community you live in. For specific information and to apply for a exception certificate to permit and allow a second kitchen in your basement you may consider visiting Loudoun County Zoning Office.