We explore magnetic behavior of kagome francisites Cu3Bi(SeO3)2O2X (X = Cl and Br) using first-principles calculations. To this end, we propose an approach based on the Hubbard model in the Wannier functions basis constructed on the level of local-density approximation (LDA). The ground-state spin configuration is determined by a Hartree-Fock solution of the Hubbard model both in zero magnetic field and in applied magnetic fields. Additionally, parameters of an effective spin Hamiltonian are obtained by taking into account the hybridization effects and spin-orbit coupling. We show that only the former approach, the Hartree-Fock solution of the Hubbard model, allows for a complete description of the anisotropic magnetization process. While our calculations confirm that the canted zero-field ground state arises from a competition between ferromagnetic nearest-neighbor and antiferromagnetic next-nearest-neighbor couplings in the kagome planes, weaker anisotropic terms are crucial for fixing spin directions and for the overall magnetization process. We thus show that the Hartree-Fock solution of an electronic Hamiltonian is a viable alternative to the analysis of effective spin Hamiltonians when a magnetic ground state and effects of external field are considered.