The expenditure described would be capital expenditure.
If you use traditional accounting, then to qualify for capital allowances there are conditions that must be satisfied.
See CA23010 ,Capital Allowances Manual - HMRC internal manual, GOV.UK (www.gov.uk).
There is also a requirement that there must be identifiable business use, so where there is a partial use of equipment for purposes other than those of your trade, then an apportionment to an amount that is just and reasonable having regard to the relevant circumstances should be made CA27000 - Capital Allowances Manual - HMRC internal manual - GOV.UK (www.gov.uk).
Qualifying expenditure incurred on solar panels qualifies for capital allowances at the special rate and attract writing down allowances at the lower rate of 6% although Annual Investment Allowance may be available, CA22335 - Capital Allowances Manual - HMRC internal manual - GOV.UK (www.gov.uk).
And for general capital allowance guidance:
Capital allowances and balancing charges (Self Assessment helpsheet HS252)
If you use cash basis accounting, there is more on capital expenditure at :
Allowable business expenses: cash basis and traditional accounting
Any payments made for both a business and a private purpose should be apportioned, and only the business proportion should be included as an allowable expense.