You need to write this code in the Button OnCLick event.
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (!this.chkCropLoan.Checked && !this.chkInvestmentLoan.Checked && !this.chkWarehouseReceipt.Checked && !this.chkFarmerProd.Checked)
{
ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Please select atleast one item!')", true);
}
}